<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss2"/>
<body
        th:with="hasRequired=${obj.rank == 2}">


<div class="layui-fluid">

    <blockquote class="layui-crumb">
        渠道管理>
        <a lay-href="/channel/list.action">渠道管理</a>>
        <a th:href="'/channel/detail.action?channelId='+${obj.channelId}">[[${obj.name}]]</a>>
        <zmn th:text="订单配置">订单配置</zmn>
    </blockquote>

    <div class="layui-card">

        <div th:replace="channel/_tab::tab"></div>

        <fieldset class="layui-elem-field">
            <div th:if="${obj.rank == 2}" class="layui-field-box" style="color: #9F9F9F;">
                此处的每一项若未设置，则将继承上级渠道配置
            </div>
        </fieldset>

        <div class="layui-card-body">
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="channelId" th:value="${obj.channelId}"/>

                <div class="layui-card-header layui-margin-b"><b>订单配置</b></div>

                <div class="layui-form-item" th:if="${obj.channelId > 0}">
                    <label class="layui-form-label">渠道ID：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">
                            <span th:text="${obj.channelId}">ID</span>
                            <span style="font-family:'ArialMT', 'Arial';color:#33AB9F;"
                                  th:text="${obj.status == 2 ? '正常' : '停用'}">status</span>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">渠道名称：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">
                            <span th:text="${obj.name}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">C端收款限制：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="outReceivablesLimit" lay-filter="outReceivablesLimit"
                               th:each="item:${receivablesLimits}"
                               th:value="${item.code}"
                               th:title="${item.name}"
                               th:checked="${orderConfig.outReceivablesLimit == item.code}"
                               lay-verify="required">
                    </div>
                    <span class="layui-form-label"
                          style="width: auto; color: #9F9F9F;">后付费指：政企/B端客服下单后，工程师先服务，客户后付费结算</span>
                </div>
                <div class="layui-form-item" id="payerDiv" th:hidden="${orderConfig.outReceivablesLimit !=3}">
                    <label class="layui-form-label layui-form-required">收尾款方：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="checkbox" name="payer" value="1" lay-filter="payer"
                               th:checked="${orderConfig == null || orderConfig.payer == null || orderConfig.payer.indexOf('1') != -1}"
                               title="啄木鸟"
                               lay-verify="required" lay-skin="primary">
                        <input type="checkbox" name="payer" value="2" lay-filter="payer"
                               th:checked="${orderConfig != null && orderConfig.payer != null && orderConfig.payer.indexOf('2') != -1}"
                               title="渠道方"
                               lay-verify="required" lay-skin="primary">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">收款方指：用户尾款支付金额流向的主体</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">F端收款限制：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="inReceivablesLimit"
                               th:each="item:${receivablesLimits}"
                               th:value="${item.code}"
                               th:title="${item.name}"
                               th:checked="${orderConfig.inReceivablesLimit == item.code}"
                               lay-verify="required">
                    </div>
                    <span class="layui-form-label"
                          style="width: auto; color: #9F9F9F;">后付费指：政企/B端客服下单后，工程师先服务，客户后付费结算</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">改预付款：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="prepayType" value="1"
                               th:checked="${orderConfig.prepayType == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="prepayType" value="2"
                               th:checked="${orderConfig.prepayType == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">后台修改订单预付款</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">收取定金：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="chargeDepositAmount" value="1"
                               th:checked="${orderConfig.chargeDepositAmount == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="chargeDepositAmount" value="2"
                               th:checked="${orderConfig.chargeDepositAmount == 2 || orderConfig.chargeDepositAmount == null}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制工程师APP前端是否显示定金入口</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">下单校验服务商：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="checkSp" value="2" lay-filter="checkSp"
                               th:checked="${orderConfig.checkSp == 2}" title="是" lay-verify="required">
                        <input type="radio" name="checkSp" value="1" lay-filter="checkSp"
                               th:checked="${orderConfig.checkSp == 1}" title="否" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">下单校验服务商指：无服务可服务工单不允许创建订单（API对接工单除外）</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">自动收单：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="autoCollectOrder" value="2" lay-filter=""
                               th:checked="${orderConfig.autoCollectOrder == 2||orderConfig.autoCollectOrder == null}"
                               title="是">
                        <input type="radio" name="autoCollectOrder" value="1" lay-filter=""
                               th:checked="${orderConfig.autoCollectOrder == 1}" title="否">
                    </div>
                </div>

                <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label layui-form-required">工单完成控制：</label>-->
                <!--<div class="layui-input-inline" style="width: 500px">-->
                <!--<zmn th:each="item:${completeOrCancelTypes}">-->
                <!--<input type="checkbox" name="workOrderCompleteType" lay-filter="workOrderCompleteType" th:title="${item.name}"-->
                <!--th:value="${item.code}" lay-skin="primary" th:checked="${orderConfig.workOrderCompleteType != null && orderConfig.workOrderCompleteType.indexOf(item.code+'') != -1}">-->
                <!--</zmn>-->
                <!--</div>-->
                <!--<span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制各个端口完成工单</span>-->
                <!--</div>-->

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">工单取消控制：</label>
                    <div class="layui-input-inline" style="width: 500px">
                        <zmn th:each="item:${completeOrCancelTypes}">
                            <input type="checkbox" name="workOrderCancelType" lay-filter="workOrderCancelType"
                                   th:title="${item.name}"
                                   th:value="${item.code}" lay-skin="primary"
                                   th:checked="${orderConfig.workOrderCancelType != null && orderConfig.workOrderCancelType.indexOf(item.code+'') != -1}">
                        </zmn>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制各个端口取消工单</span>
                </div>

                <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label layui-form-required">特殊优惠控制：</label>-->
                <!--<div class="layui-input-inline" style="width: 500px">-->
                <!--<zmn th:each="item:${specialOfferTypes}">-->
                <!--<input type="checkbox" name="workOrderSpecialOfferType" lay-filter="workOrderSpecialOfferType" th:title="${item.name}"-->
                <!--th:value="${item.code}" lay-skin="primary" th:checked="${orderConfig.workOrderSpecialOfferType != null && orderConfig.workOrderSpecialOfferType.indexOf(item.code+'') != -1}">-->
                <!--</zmn>-->
                <!--</div>-->
                <!--<span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制订单各个端口的特殊优惠（人工优惠）</span>-->
                <!--</div>-->

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">贴花：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="applique" value="1"
                               th:checked="${orderConfig.applique == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="applique" value="2"
                               th:checked="${orderConfig.applique == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制APP贴花上传功能</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">透传订单价格：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="showOrderPrice" value="1"
                               th:checked="${orderConfig.showOrderPrice == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="showOrderPrice" value="2"
                               th:checked="${orderConfig.showOrderPrice == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">透传订单价格给商家</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">系统后台录单：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="hidden" value="1"
                               th:checked="${orderConfig.hidden == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="hidden" value="2"
                               th:checked="${orderConfig.hidden == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">运营后台录单</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">渠道门户录单：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="portalAddOrder" value="1"
                               th:checked="${orderConfig.portalAddOrder == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="portalAddOrder" value="2"
                               th:checked="${orderConfig.portalAddOrder == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制渠道门户（商家中心）录单</span>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">发送短信：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="sendMsg" value="1"
                               th:checked="${orderConfig.sendMsg == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="sendMsg" value="2"
                               th:checked="${orderConfig.sendMsg == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">推送订单短信</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">修改渠道：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="platformType" value="1"
                               th:checked="${orderConfig.platformType == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="platformType" value="2"
                               th:checked="${orderConfig.platformType == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">后台订单修改渠道</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">转换渠道：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="transType" value="1" lay-filter="transType"
                               th:checked="${orderConfig.transType == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="transType" value="2" lay-filter="transType"
                               th:checked="${orderConfig.transType == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">下单手机号满足对应下单条件时，将该渠道订单转换为目标渠道</span>
                </div>

                <div class="layui-form-item" id="transDiv" th:hidden="${orderConfig.transType != 2}">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline" style="width:50px">
                        <input type="number" name="transTime"
                               lay-verType="tips" lay-verify="positive"
                               th:value="${orderConfig.transTime}"
                               autocomplete="off" class="layui-input"/>
                    </div>
                    <span class="layui-form-label" style="width: auto; left: -20px; color: #1f1c1c;">小时内，联系电话在</span>
                    <div class="layui-input-inline" style="width:300px; left: -20px;">
                        <div id="transChannel"></div>
                    </div>
                    <span class="layui-form-label" style="width: auto; left: 135px; color: #9F9F9F;">创建过新单，则将下单渠道修改为目标渠道 举例：有2个渠道A、B，在A渠道配置了，3小时内，联系电话在B渠道创建过新单，此时在A渠道下了一个订单A，满足以上条件，则A的下单渠道修改为B渠道</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">核销码入口：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="codeEntry" value="1" lay-filter="codeEntry"
                               th:checked="${orderConfig.codeEntry == 1}" title="无" lay-verify="required">
                        <input type="radio" name="codeEntry" value="2" lay-filter="codeEntry"
                               th:checked="${orderConfig.codeEntry == 2}" title="有" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制工程师端核销码入口显示/隐藏</span>
                </div>
                <div class="layui-form-item" id="correctDiv" th:hidden="${orderConfig.codeEntry != 2}">
                    <label class="layui-form-label layui-form-required">校验准确性：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="checkCorrect" value="1"
                               th:checked="${orderConfig.checkCorrect == 1}" title="否" lay-verify="required">
                        <input type="radio" name="checkCorrect" value="2"
                               th:checked="${orderConfig.checkCorrect == 2}" title="是" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">通过渠道接口校验工程师填写核销码的准确性</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">订单转单：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="orderTransferType" value="1"
                               th:checked="${orderConfig.orderTransferType == 1}" title="不允许" lay-verify="required">
                        <input type="radio" name="orderTransferType" value="2"
                               th:checked="${orderConfig.orderTransferType == 2}" title="允许" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">订单转单到其他平台</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">服务审核：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="auditType" value="1" lay-filter="auditType"
                               th:checked="${orderConfig.auditType == 1}" title="不需审核" lay-verify="required">
                        <input type="radio" name="auditType" value="2" lay-filter="auditType"
                               th:checked="${orderConfig.auditType == 2}" title="F端需审核" lay-verify="required">
                        <input type="radio" name="auditType" value="3" lay-filter="auditType"
                               th:checked="${orderConfig.auditType == 3}" title="保外审核" lay-verify="required">
                        <input type="radio" name="auditType" value="4" lay-filter="auditType"
                               th:checked="${orderConfig.auditType == 4}" title="均需审核" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">目前仅：运营平台可审核，也仅支持：F端订单</span>
                </div>

                <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label layui-form-required">超时预警通知：</label>-->
                <!--<div class="layui-input-inline" style="width:600px">-->
                <!--<input type="radio" name="notifyEngineer" value="2" lay-filter="notifyEngineer"-->
                <!--th:checked="${orderConfig.notifyEngineer == 2}" title="是" lay-verify="required">-->
                <!--<input type="radio" name="notifyEngineer" value="1" lay-filter="notifyEngineer"-->
                <!--th:checked="${orderConfig.notifyEngineer == 1}" title="否" lay-verify="required">-->
                <!--</div>-->
                <!--<span class="layui-form-label" style="width: auto; color: #9F9F9F;">应用于工单超时预警后，是否需要通知工程师</span>-->
                <!--</div>-->

                <div class="layui-form-item" id="auditMinPriceDiv"
                     th:hidden="${orderConfig.auditType==1 || orderConfig.auditType == null || orderConfig.auditType == ''}">
                    <label class="layui-form-label layui-form-required">审核起始金额：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="auditMinPrice"
                               lay-verType="tips"
                               th:value="${orderConfig.auditMinPrice == null ? null:(orderConfig.auditMinPrice / 100)}"
                               autocomplete="off" class="layui-input"
                               oninput="value=value.replace(/[^\d]/g,'');if(value>1000000)value=1000000;if(value<0)value=0;"/>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">元, 指：订单金额大于等于该金额，才需审核 </span>
                </div>

                <div class="layui-form-item" id="deptDiv"
                     th:hidden="${orderConfig.auditType==1 || orderConfig.auditType == null || orderConfig.auditType == ''}">
                    <label class="layui-form-label  layui-form-required">价格审核部门：</label>
                    <div class="layui-input-inline" id="deptSelect">
                        <!--<select name="deptOneId" id="deptOneId" lay-filter="deptOneId" th:value="${deptOneId}">-->
                        <!--<option value="">-选择-</option>-->
                        <!--<option th:value="${dept.deptId}" th:selected="${dept.deptId == deptOneId}" th:text="${dept.deptName}" th:each="dept:${deptOnes}">部门名称</option>-->
                        <!--</select>-->
                    </div>
                    <!--<div class="layui-input-inline">-->
                    <!--<select name="deptTwoId" id="deptTwoId" lay-filter="deptTwoId" th:value="${deptTwoId}">-->
                    <!--<option value="">-选择-</option>-->
                    <!--<option th:value="${dept.deptId}" th:selected="${dept.deptId == deptTwoId}" th:text="${dept.deptName}" th:each="dept:${deptTwos}">部门名称</option>-->
                    <!--</select>-->
                    <!--</div>-->
                    <!--<div class="layui-input-inline">-->
                    <!--<select name="deptThrId" id="deptThrId" lay-filter="deptThrId" th:value="${deptThrId}">-->
                    <!--<option value="">-选择-</option>-->
                    <!--<option th:value="${dept.deptId}" th:selected="${dept.deptId == deptThrId}" th:text="${dept.deptName}" th:each="dept:${deptThrs}">部门名称</option>-->
                    <!--</select>-->
                    <!--</div>-->
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">对应由总部那个部门审核 </span>
                </div>

                <!--<div class="layui-form-item">-->
                <!--<div id="dept"></div>-->
                <!--&lt;!&ndash;<label class="layui-form-label layui-form-required">审核部门：</label>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="layui-input-inline" style="width:300px">&ndash;&gt;-->
                <!--&lt;!&ndash;<input type="text" name="fristProtectedPeriod" th:lay-verify="${hasRequired ? 'required' : ''}"&ndash;&gt;-->
                <!--&lt;!&ndash;lay-verType="tips" th:value="${obj.fristProtectedPeriod}"&ndash;&gt;-->
                <!--&lt;!&ndash;autocomplete="off" class="layui-input" oninput="value=value.replace(/[^\d]/g,'');if(value>1000000)value=1000000;if(value<0)value=0;"/>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--<span class="layui-form-label" style="width: auto; color: #9F9F9F;">对应由总部那个部门审核 </span>-->
                <!--</div>-->

                <!--<div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">首次保护期：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="fristProtectedPeriod" th:lay-verify="${hasRequired ? 'required' : ''}"
                               lay-verType="tips" th:value="${orderConfig.fristProtectedPeriod}"
                               autocomplete="off" class="layui-input" oninput="value=value.replace(/[^\d]/g,'');if(value>10000)value=10000;if(value<0)value=0;"/>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">天, 指：渠道带来的用户，在保护期内，一直不活跃，则不算该渠道带来的用户； <block style="color: red">请在和产品经理取得沟通后，进行调整</block></span>
                </div>-->

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required" style="width: 126px">用户活跃保护期：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="latelyProtectedPeriod" th:lay-verify="${hasRequired ? 'required' : ''}"
                               lay-verType="tips" th:value="${orderConfig.latelyProtectedPeriod}"
                               autocomplete="off" class="layui-input"
                               oninput="value=value.replace(/[^\d]/g,'');if(value>10000)value=10000;if(value<0)value=0;"/>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">天, 指：用户通过某渠道的活跃行为，在多少天内有效；<block
                            style="color: red">请在和产品经理取得沟通后，进行调整</block></span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">渠道门户显示订单：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="channelPortalDisplayOrder" value="1"
                               th:checked="${orderConfig.channelPortalDisplayOrder == 1}" title="下单渠道"  th:disabled="${orderConfig.channelPortalDisplayOrder != null}" lay-verify="required">
                        <input type="radio" name="channelPortalDisplayOrder" value="2"
                               th:checked="${orderConfig.channelPortalDisplayOrder == 2}" title="来源渠道"  th:disabled="${orderConfig.channelPortalDisplayOrder != null}" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制渠道门户根据来源/下单渠道显示订单，选择后不允许修改，请认真选择</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">邀评：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="inviteComment" value="2" lay-filter="inviteComment"
                               th:checked="${orderConfig.inviteComment == 2}" title="是" lay-verify="required">
                        <input type="radio" name="inviteComment" value="1" lay-filter="inviteComment"
                               th:checked="${orderConfig.inviteComment == 1 || orderConfig.inviteComment == null}" title="否" lay-verify="required">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">控制工程师APP是否显示邀请提示</span>
                </div>

                <div class="layui-form-item" id="inviteCommentPlatDiv"th:hidden="${orderConfig.inviteComment==1 || orderConfig.inviteComment == null || orderConfig.inviteComment == ''}">
                    <label class="layui-form-label">邀评平台：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="inviteCommentPlat" class="layui-input" th:value="${orderConfig.inviteCommentPlat}" maxlength="32" />
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">指：用户操作评价的平台</span>
                </div>

                <div class="layui-form-item" id="inviteCommentExplainDiv" th:hidden="${orderConfig.inviteComment==1 || orderConfig.inviteComment == null || orderConfig.inviteComment == ''}">
                    <label class="layui-form-label">邀评说明：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <script id="inviteCommentExplain" width="900px" name="inviteCommentExplain" type="text/plain">
                        </script>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">指：用户操作评价的平台</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">引导去第三方平台支付：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="guideThirdPartPay" value="2"
                               th:checked="${orderConfig.guideThirdPartPay == 2}" lay-verify="required"  lay-filter="guideThirdPartPay"
                               title="是">
                        <input type="radio" name="guideThirdPartPay" value="1" lay-verify="required"  lay-filter="guideThirdPartPay"
                               th:checked="${orderConfig.guideThirdPartPay == 1 || orderConfig.guideThirdPartPay == null}" title="否">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">指：控制工程师端，是否引导用户去第三方支付</span>
                </div>

                <div class="layui-form-item" id="qrPayDiv" th:hidden="${orderConfig.guideThirdPartPay==1 || orderConfig.guideThirdPartPay == null || orderConfig.guideThirdPartPay == ''}">
                    <label class="layui-form-label layui-form-required">工程师APP显示收款码：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="radio" name="showPayQr" value="2"
                               th:checked="${orderConfig.showPayQr == 2}" lay-verify="required"  lay-filter="showPayQr"
                               title="是">
                        <input type="radio" name="showPayQr" value="1" lay-verify="required"  lay-filter="showPayQr"
                               th:checked="${orderConfig.showPayQr == 1 || orderConfig.showPayQr == null}" title="否">
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">指：引导用户去第三方支付时，工程师APP是否显示收款码</span>
                </div>

                <div class="layui-form-item" id="payPlatDiv"  th:hidden="${orderConfig.guideThirdPartPay==1 || orderConfig.guideThirdPartPay == null || orderConfig.guideThirdPartPay == ''}">
                    <label class="layui-form-label">支付平台：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <input type="text" name="payPlat" class="layui-input" th:value="${orderConfig.payPlat}" maxlength="32" />
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">指：用户需要支付的平台</span>
                </div>

                <div class="layui-form-item" id="payExplainDiv"  th:hidden="${orderConfig.guideThirdPartPay==1 || orderConfig.guideThirdPartPay == null || orderConfig.guideThirdPartPay == ''}">
                    <label class="layui-form-label">尾款支付说明：</label>
                    <div class="layui-input-inline" style="width:600px">
                        <script id="payExplain" width="900px" name="payExplain" type="text/plain">
                        </script>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">工程师提醒：</label>
                    <div class="layui-input-block" style="width:600px;">
                        <textarea name="desc" th:text="${orderConfig.desc}" class="layui-textarea"
                                  placeholder="工程师提醒(600字以内)" maxlength="600" lay-verify=""
                                  lay-verType="tips"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">提醒内容将在工程师APP中显示</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">派单提醒：</label>
                    <div class="layui-input-block" style="width:600px;">
                        <textarea name="scale" th:text="${orderConfig.scale}" class="layui-textarea"
                                  placeholder="渠道规模/用途描述(600字以内)" maxlength="600" lay-verify=""
                                  lay-verType="tips"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">提醒内容将在运营后台订单详情显示</span>
                </div>
                <!-- 备注-->
                <zmn th:if="${orderConfig.channelId > 0}">
                    <div class="layui-card-header layui-margin-b layui-form-required"><b>备注</b></div>
                    <label class="layui-form-label "></label>
                    <div class="layui-input-inline" style="width:40%">
                    <textarea name="remark" placeholder="请输入修改原因字数：小于500字" class="layui-textarea" style="height: auto"
                              maxlength="500" lay-verify="required"
                    ></textarea>
                    </div>
                </zmn>
                <zmn th:if="${orderConfig.channelId > 0}">
                    <div class="layui-card-header layui-margin-b"><b>其他信息</b></div>

                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label">修改人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux"
                                 th:text="${orderConfig.updater} + '&nbsp;/&nbsp;' + ${#dates.format(orderConfig.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
                                修改人/时间
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label">创建人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux"
                                 th:text="${orderConfig.creater} + '&nbsp;/&nbsp;' + ${#dates.format(orderConfig.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                                创建人/时间
                            </div>
                        </div>
                    </div>
                </zmn>

                <div class="layui-form-item submit"
                     th:if="${#authPermit.checkPermit('/channel/orderConfig/addEdit.action') || (#authPermit.checkPermit('/channel/add.action') && addFlag == '1')}">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary" id="zmn-form-reset">重置</button>
                    </div>
                </div>

            </form>

        </div>

    </div>

</div>
</body>
</html>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.js"></script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript" th:inline="javascript">
    let toolbars = [
        ['fullscreen', 'source', 'undo', 'redo'],
        ['simpleupload', 'insertimage', 'snapscreen', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','fontsize']
    ];
    let inviteCommentExplainUe = UE.getEditor('inviteCommentExplain', {
        initialFrameHeight: 200,
        initialFrameWidth: 600,
        maximumWords: 5000,
        autoHeightEnabled: false,
        toolbars: toolbars
    });
    let payExplainUe = UE.getEditor('payExplain', {
        initialFrameHeight: 200,
        initialFrameWidth: 600,
        maximumWords: 5000,
        autoHeightEnabled: false,
        toolbars: toolbars
    });

    UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
    UE.Editor.prototype.getActionUrl = function (action) {
        // 这里很重要，很重要，很重要，要和配置中的imageActionName值一样
        if (action == 'uploadimage') {
            // 这里调用后端我们写的图片上传接口
            return '/ueditor/uploadImageData';
        } else {
            return this._bkGetActionUrl.call(this, action);
        }
    }
    //对编辑器的操作最好在编辑器ready之后再做
    inviteCommentExplainUe.ready(function () {
        inviteCommentExplainUe.execCommand('insertHtml', [[${orderConfig.inviteCommentExplain}]]);
    });
    payExplainUe.ready(function () {
        payExplainUe.execCommand('insertHtml', [[${orderConfig.payExplain}]]);
    });
</script>

<script type="text/javascript" th:inline="javascript">

    var json = {
        addFlag: [[${addFlag}]],
        priceAuditDeptId: [[${orderConfig.priceAuditDeptId==null?0:orderConfig.priceAuditDeptId}]],
        expandedKeys: [[${expandedKeys}]],
        channel: [[${obj}]],
        orderConfig: [[${orderConfig}]],
        channelList: [[${channelList}]],
    };

    layui.config({
        base: "/static/lay/",
        version: 202110211550
    }).extend({
        index: "lib/index",
        channel_order_config: "channel/zmn.plat.channel.order.config",
    }).use(['index', 'channel_order_config']);

</script>
